home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / TECHNICA / AUTOCAD / H107.ZIP / AUTOCM30.ZIP / AUTOCMND.DOC < prev    next >
Text File  |  1991-09-03  |  18KB  |  363 lines

  1.  
  2.                                                                  Page 1
  3.  
  4. -----------------------------------------------------------------------
  5. ----------------------| AUTOCOMMAND |----------------------------------
  6. -----------------------------------------------------------------------
  7. Eric Michalowsky                              Voice    (213) 829-7535
  8. Cohen and Kanwar, Inc.                        Fax      (213) 829-7950
  9. Consulting Electrical Engineers               Modem    (213) 829-7151
  10. 1753 Cloverfield Boulevard
  11. Santa Monica, CA 90404                        C-Serve  72070-3704
  12.  
  13. -----------------------------------------------------------------------
  14.  
  15. Welcome to AutoCommand - a lisp routine that may well revolutionize
  16. the way you use AutoCad!!!
  17.  
  18. ----------------------- INTRODUCTION ----------------------------------
  19.  
  20. The following is a simplified discussion of the AutoCommand routine -
  21. the best way to see its usefulness is to jump right in and use it!!
  22.  
  23. AutoCommand allows the operator to use what is existing on the screen to 
  24. add extra information, edit the information that is there, manipulate 
  25. the layers of the drawing, zoom around the drawing and manipulate text 
  26. in the drawing - all with one letter commands. As easy as that. About 
  27. 90% of the commands used 90% of the time can be invoked with this one 
  28. command. Theoretically, for about 80% of your work you can run this one
  29. command instead of picking all the different ones from either the 
  30. digitizer, screen menu or pull-downs. You can also add this command to 
  31. your pull-downs so that it will work continuously until you decide
  32. otherwise and Ctrl-C the command.
  33.  
  34. The basic premise to AutoCommand is, by moving the crosshairs around the
  35. screen, to recognize entities on the screen and then either Edit these
  36. recognized entities, begin a new Draw command based on the entity
  37. recognized by the command or manipulate layers and entities based on the
  38. layer of the entity recognized. This may at this stage seem quite
  39. complicated but after using the command a few times you will see the
  40. advantages and time-savings.
  41.  
  42.                                                                  Page 2
  43.  
  44. ------------------------- METHOD --------------------------------------
  45.  
  46. Load the command with '(load "autocmnd")' and then run the command with
  47. 'AC'. Move the crosshairs slowly across the screen and, watching
  48. the status line, you will notice the crosshairs "recognizing" whatever
  49. entity it has just crossed over. You can then enter one of many commands
  50. as described later - based on the entity under the crosshairs.
  51.  
  52. ---------------------- STATUS LINE ------------------------------------
  53.  
  54. As soon as the crosshairs has "recognized" the entity it has just passed
  55. over, the command will report all necessary information about this
  56. entity on the status line. In draw/edit mode (explained later) you will
  57. see, starting from the far left, i) the type of entity (line/ pline/
  58. block/ circle/ etc.), ii) what layer the entity is on and iii) what
  59. color the entity is. If the entity is a block - the name of the block
  60. will be shown, as well as its scale and rotation angle. If the X, Y & Z
  61. scales of the block are the same, just one scale factor is reported,
  62. otherwise the separate and different X, Y & Z scale factors are reported
  63. - thereby letting you know whether the block can be exploded. (ie. if X,
  64. Y and Z are the same, AutoCommand will report "Blkname (1.0<90)" - showing
  65. you that it just recognized a block by the name of "Blkname", that the
  66. block's x, y & z scales are both one and that the angle of the block is
  67. 90 degrees, if they differ the following will be reported "Blkname
  68. (1.0,2.0,3.0<90)"). In layer mode, you will just see the name of the
  69. entity/block, the layer it is on and whether it's color is "BYLAYER".
  70.  
  71. In Text mode only text entities are reported. The status line shows 'TXT
  72. - ' and then shows the width (W:) if it is other than 1, height (H:),
  73. style (S:) and justification (J:). Where the coordinates usually show 
  74. you will see the first twenty letters of the text line that was 
  75. recognized.
  76.  
  77. ----------------- THE FIVE PARTS TO AUTOCOMMAND -----------------------
  78.  
  79. a) Edit Commands
  80. The following edit commands can be issued to AutoCommand
  81.  - Array, Break, Copy, Erase, oFfset, stretcH, Move, Mirror, Pedit, 
  82. Rotate, Scale, and eXplode. All of these commands can be applied to the 
  83. entity recognized by the crosshairs - plus will allow you to add any 
  84. other entities to the selection set before finally executing the 
  85. command (except, obviously, offset). ie. If you wanted to erase several 
  86. entities, you would move the crosshairs over one of the entities so that 
  87. the command recognizes it, press "E" for erase. The entity last 
  88. recognized by the command will be highlighted and the command will 
  89. prompt you to "select objects". After pressing enter, the selected 
  90. entities will be erased.
  91.  
  92. If you try to break an entity that cannot be broken, an error message
  93. will show and you can continue with the command. If you try to explode
  94. an entity that cannot be exploded or a block with differing x and y
  95. values, you will get an error message and will be allowed to reselect.
  96. If you try to pedit a non-polyline entity, you will be warned again.
  97. If you press an invalid key, you will also be informed.
  98.  
  99. You can even undo previous commands from inside AutoCommand.
  100.  
  101.                                                                  Page 3
  102.  
  103. b) Draw Commands
  104. Nearly every draw command can be invoked by AutoCommand - if a similar
  105. entity exists on the screen. For example, to draw a line, move the
  106. crosshairs over a line so that it is recognized and is reported at the
  107. status line. Press "N" for "New command" or "D" for "Draw" and bingo,
  108. the line command is invoked. In addition to this, AutoCommand will allow
  109. you to start the line at the closest endpoint to the line picked !!!
  110.  
  111. If the recognized entity is a block, pressing "I" will insert the same
  112. block at the same scale - prompting for insertion point and rotation
  113. angle. Forget about remembering the names of all blocks in the drawing -
  114. USE AUTOCOMMAND!! If you press "N" after a block has been recognized,
  115. you will be asked if you wish to insert the same block at the same scale
  116. or whether you wish to stipulate the name of a new block. 
  117.  
  118. If the recognized entity is a circle, you will be permitted to draw
  119. another circle in with the same center point as the circle recognized or
  120. a different circle elsewhere.
  121.  
  122. If text has been recognized, you will be asked if you wish to continue
  123. the text command immediately after the recognized text line. If so, the
  124. same style, height and rotation angle will be set and if the X-value is
  125. other than 1, AutoCommand will report what the x-scale is and will change
  126. it accordingly. You can of course start the text command from a 
  127. completely new place, with new style, height, etc. - it's up to you!
  128.  
  129. Of course, when using AutoCommand to draw new entities based on existing
  130. ones, it will set the layer to that of the existing entity.
  131.  
  132. c) Layer Manipulation
  133. By pressing "L" when in AutoCommand, you will be switched over to the
  134. layer manipulation mode. In the status line, you will now see the
  135. current layer and mode settings but where the coordinates should be,
  136. you will see the type of entity and what layer it is on. If the entity's
  137. color is not "BYLAYER" then an "*" will appear before the entity type.
  138.  
  139. The crosshairs will still report on whatever entity it has crossed over.
  140. For explanation purposes, I will call the layer reported in the status
  141. area, the "displayed layer". You can now use this info to i) make the
  142. displayed layer current ii) switch the displayed layer off iii) freeze
  143. the displayed layer iv) make the displayed layer current and switch all
  144. others off or v) delete all entities on the displayed layer.
  145.  
  146. If you try to freeze or switch off the current layer, you will get an
  147. error message and be allowed to continue.
  148.  
  149. You can of course return to the edit/draw mode of the command by
  150. pressing "X".
  151.  
  152. d) Zoom
  153. With Version 2 of AutoCommand, you can now ZOOM window, extents, limits
  154. (all), previous, to the smallest or biggest screen without regenerating
  155. and PAN normally or one screen left, right up or down.
  156.  
  157.                                                                  Page 4
  158.  
  159. e) Text
  160. With Version 3 of AutoCommand, I have introduced the Text manipulation 
  161. section. As mentioned previously, on the status line only text entities 
  162. are reported. You will be informed as to the text's width (if it is 
  163. other than 1), justification, height and style - preceded by the first 
  164. letter of what is being reported. You will also be shown the first 
  165. twenty letters of the text line. ie. A line of text ("This is text") 
  166. that is 6" high, style "txt", width 1.25 and center justified will be 
  167. shown as follows:-
  168.         TXT - W:1.25 J:C S:txt H:6         "This is text"
  169.  
  170. You will then be allowed to add text (Continue), continue text below the 
  171. recognized line with the same layer, style, height and justificiation 
  172. (Continue), edit the text using revision 11's dialogue box (edit), 
  173. change the height (height), justification (justification), style (style) 
  174. or width (x-Value) of any or all text in the drawing and you will be 
  175. able to replace every occurrance of a particular string with another 
  176. string (replace). After each one of these commands except the edit and 
  177. redraw commands, you will be returned to the main AutoCommand menu. 
  178. Redraw returns to the text menu and Edit returns to the AutoCad Command 
  179. prompt.
  180.  
  181. Also in Revision 3 are four help screens with explanations on what the 
  182. different key presses mean.
  183.  
  184. ------------------------ RESTRICTIONS ----------------------------------
  185.  
  186. AutoCad will only allow a certain number of characters to be shown in
  187. the status line. Therefore if you are using AEC or use blocks or layers
  188. with long names, the entities reported on the status line may be
  189. truncated. My layers and blocks are approx. 8 letters long each and the
  190. command works fine.
  191.  
  192. If your drawing is large, the crosshairs may move a lot slower than
  193. regularly as they are constantly checking for entities.
  194.  
  195. As colors past color 7 are not standard, AutoCommand will only report
  196. the number. However, if you wish to change the number to a name (as I
  197. have on my system) use a text editor or word processor in non-document
  198. mode and change the following code:
  199.  
  200.     ((= h 8) (setq clr "8"))
  201.     ((= h 9) (setq clr "9"))
  202.     ((= h 10) (setq clr "10"))
  203.     ((= h 11) (setq clr "11"))
  204.     ((= h 12) (setq clr "12"))
  205.     ((= h 13) (setq clr "13"))
  206.     ((= h 14) (setq clr "14"))
  207.     ((= h 15) (setq clr "15"))
  208.  
  209. To:                            /------------- put your names here
  210.     ((= h 8) (setq clr "orange")) 
  211.     ((= h 9) (setq clr "lime"))
  212.     ((= h 10) (setq clr "teal"))
  213.     ((= h 11) (setq clr "lt.blue"))
  214.     ((= h 12) (setq clr "purple"))
  215.     ((= h 13) (setq clr "fuschia"))
  216.     ((= h 14) (setq clr "dk.grey"))
  217.     ((= h 15) (setq clr "lt.grey"))
  218.  
  219. or whatever your colors are but keep them short.
  220.  
  221.                                                                  Page 5
  222.  
  223. ---------------- BUGS/SUGGESTIONS/REGISTRATION/ETC. -------------------
  224.  
  225. I have checked the routine for bugs several times but am human -
  226. if you find any, please let me know and I will try to fix 'em.
  227. There also may be commands that I have forgotten to remove that are
  228. specific to my machine/blocks/etc. If I have left any in, please forgive
  229. me - I will repent...
  230.  
  231. I would really appreciate any comments or suggestions and if you use the
  232. routine and you'd like to encourage me to continue trying (and would
  233. like me to hurry with the next revision - see below), you may send $15.00
  234. to my "reduce the credit card balance" fund at the address below.
  235.  
  236. I am in the process of adding an extra section to the routine. This will
  237. add many block editting features such as
  238.         i) update every occurrance of a picked block to another picked 
  239.            block
  240.        ii) replace selected blocks with a particluar block
  241.       iii) change the color of individual entities of a block (including nested) to "BYLAYER".
  242.        iv) explode selected blocks
  243.         v) explode blocks with differing x and y values
  244.        vi) highlight and count the occurances of a particular block
  245.       vii) explode a block to a user-specified layer
  246.      viii) scale selected blocks by a scale factor (using their ins. 
  247.            point as the base point)
  248. These features will be added if I receive enough registrations that it
  249. warrants the time spent.
  250.  
  251. Because of the "slowness and jerk" of this routine in a large drawing, I 
  252. am debating with myself about changing the routine so that when an 
  253. entity is picked, the routine will offer the available commands to edit 
  254. or add entities. This will eliminate any slowness and jerk. This will, 
  255. however, involve a lot of code revision so if you want it, let me know 
  256. and if there is enough repsonse I will get to work...
  257.  
  258. Hope you like AutoCommand and that it gives you the competitive edge and
  259. profit margin you deserve.
  260.  
  261. Eric Michalowsky
  262.  
  263. ------------------------- CREDITS ---------------------------------------
  264.  
  265. Credit should be given where credit is due. I have used several routines
  266. that I have "picked up" in the past and added/editted them. I have
  267. unfortunately not kept track of who wrote what so, for all those
  268. "unknown lisp programmers" that have given me guidance, thank you all.
  269.  
  270. The basic inspiration of using the crosshairs and the status line for
  271. this purpose was found in a lisp routine in the October 1990 Cadence
  272. magazine and I would like to thank Daniel M. Iaria for that routine and
  273. the inspiration.
  274.  
  275.                                                                  Page 6
  276.  
  277. -------------------- REVISION HISTORY ----------------------------------
  278.  
  279. -------------------- REVISION 2 CHANGES --------------------------------
  280.   i. Help screens now available
  281.  ii. Improved prompts for single monitor users
  282. iii. Undo command
  283.  iv. Bug Fix with the (RTD) and (DTR) functions
  284.   v. Zoom Section
  285.  
  286. -------------------- REVISION 3 CHANGES --------------------------------
  287.   i. Redraw added where necessary
  288.  ii. Text manipulation section added:
  289.         a. add text
  290.         b. continue text with same parameters as picked
  291.         c. edit text
  292.         d. change style of selected strings
  293.         e. change jusitification of selected strings
  294.         f. change height of selected strings
  295.         g. change width (x-Value) of selected strings
  296.         h. replace every occurrance of a string of letters with a 
  297.            different string
  298. iii. Stretch added to main menu
  299.  iv. Offset added to main menu
  300.   v. Array added to main menu
  301.  
  302.                                                                  Page 7
  303.  
  304. -------------------- CUSTOMIZATION ------------------------------------
  305.  
  306. As every drafter has their own unique way of doing things (especially in 
  307. AutoCad), the set-up and/or commands in AutoCommand may not be optimal.  
  308. I can, therefore, customize AutoCommand to suit the needs of most 
  309. tasks/draftsmen/designers. If you would like particular commands or 
  310. other lisp routines, such as dimensioning, to be added to AutoCommand I 
  311. can hopefully change the program to best suit your needs. However, 
  312. because it is a "one-of-a-kind" type thing I will have to charge for 
  313. registration as well as for the changes.
  314.  
  315. As the changes may be simple or extremely difficult, I will have to 
  316. "quote" on any such changes but as I learn while I add/change it 
  317. shouldn't be too expensive.
  318.  
  319. If you would like a cuustomized version of AutoCommand for your 
  320. office/needs, either send me a message, call me at the number in this 
  321. documentation or write to me at the address in this documantation and I 
  322. will get back to you as to the feasibility and charge.
  323.  
  324.  
  325.                                                                  Page 8
  326.  
  327. -------------------- THE USUAL WARRANTY & DISCLAIMER ------------------
  328.  
  329.     This program/routine is provided AS IS.  Eric Michalowsky MAKES NO 
  330.     WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING WITHOUT 
  331.     LIMITATION, ANY WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 
  332.     PARTICULAR PURPOSE.
  333.  
  334.  
  335.                   =================================
  336.                   Registered Version ONLY Warranty:
  337.                   =================================
  338.  
  339.     Eric Michalowsky warrants the physical diskette(s) provided with 
  340.     registered versions to be free of defects in materials and
  341.     workmanship for a period of sixty days from the date of 
  342.     registration.  If Eric Michalowsky receives notification within the 
  343.     warranty period of defects in materials or workmanship, and such 
  344.     notification is determined by Eric Michalowsky to be correct,Eric 
  345.     Michalowsky will replace the defective diskette(s) or documentation.
  346.  
  347.     The entire and exclusive liability and remedy for breach of this 
  348.     Limited Warranty shall be limited to replacement of defective 
  349.     diskette(s) and shall not include or extend to any claim for or
  350.     right to recover any other damages, including but not limited to, 
  351.     loss of profit, data, or use of the software, or special, 
  352.     incidental, or consequential damages or other similar claims, even 
  353.     if Eric Michalowsky has been specifically advised of the possibility 
  354.     of such damages.  In no event will Eric Michalowsky's liability for 
  355.     any damages to you or any other person ever exceed the lower of 
  356.     suggested list price or actual price paid for the license to use the 
  357.     software, regardless of any form of the claim.
  358.  
  359.     Eric Michalowsky SPECIFICALLY DISCLAIMS ALL OTHER
  360.     WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED
  361.     TO, ANY IMPLIED WARRANTY OF MERCHANTABILITY AND/OR FITNESS
  362.     FOR A PARTICULAR PURPOSE.
  363.